#include <iostream>
using namespace std;
class CHI;
class USA{
public:
    void print(){
        cout<<_value<<endl;
    }
    friend class CHI;
    USA(double value)
    :_value(value)
    {

    }
    operator CHI();
private:
double _value;
};

class CHI{
public:
    void print(){
        cout<<_value<<endl;
    }
    friend class USA;
    CHI(double value)
    :_value(value)
    {

    }
    operator USA();
private:

double _value;
};
CHI::operator USA(){
    return USA(_value*7.14);
}
USA::operator CHI(){
    return CHI(_value/7.14);
}
void test(){
    USA usa(100);
    CHI chi(100);
    usa.print();
    chi.print();
    usa=chi;
    usa.print();
    chi=usa;
    chi.print();
}
int main(int argc, char * argv[]){
    test();
    return 0;
}

